package com.turing.post.salesmanage.util;

import java.math.BigInteger;
import java.util.List;

import javax.ejb.Local;
import javax.ejb.Remote;

import com.turing.post.util.PCPSApplicationException;

/**
 * 销售单销售员明细业务接口
 * 
 * @author zxp
 * @Dec 23, 2012
 */
@Remote
@Local
public interface SaleOrderSalesDetailDao {

	/**
	 * 根据主键查询销售单销售员明细
	 * 
	 * @param saleOrderSalesDetail
	 *            销售单销售员明细
	 * @return 销售单销售员明细
	 */
	public SaleOrderSalesDetail getSaleOrderSalesDetailByPrimaryKey(
			SaleOrderSalesDetail saleOrderSalesDetail);

	/**
	 * 查询一个销售单下所有销售员明细
	 * 
	 * @param saleOrderId
	 *            销售单编号
	 * @return 销售单销售员明细列表
	 */
	public List<SaleOrderSalesDetail> getSaleOrderSalesDetailListBySaleOrderId(
			BigInteger saleOrderId);

	/**
	 * 查询销售单下销售员明细列表
	 * 
	 * @param saleOrderId
	 *            销售单编号
	 * @param page
	 *            页码
	 * @return 销售员明细列表列表
	 */
	public List<SaleOrderSalesDetail> getSaleOrderSalesDetailListBySaleOrderIdAndPage(
			BigInteger saleOrderId, Integer page);

	/**
	 * 查询单个销售单下销售员记录数
	 * 
	 * @param saleOrderId 销售单编号
	 * @return 记录数
	 */
	public BigInteger getSaleOrderSalesDetailTotalBySaleOrderId(
			BigInteger saleOrderId);

	/**
	 * 新增
	 * 
	 * @param saleOrderSalesDetail
	 * @throws PCPSApplicationException
	 */
	public void insertSaleOrderSalesDetail(
			SaleOrderSalesDetail saleOrderSalesDetail)
			throws PCPSApplicationException;

	/**
	 * 修改
	 * 
	 * @param saleOrderSalesDetail
	 * @throws PCPSApplicationException
	 */
	public void updateSaleOrderSalesDetail(
			SaleOrderSalesDetail saleOrderSalesDetail)
			throws PCPSApplicationException;

	/**
	 * 删除
	 * 
	 * @param saleOrderSalesDetail
	 * @throws PCPSApplicationException
	 */
	public Integer deleteSaleOrderSalesDetail(
			SaleOrderSalesDetail saleOrderSalesDetail)
			throws PCPSApplicationException;
}
